<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-model的修饰符</title>
  <script src="/js/vue.js"></script>
</head>
<body>
  <div id="app">
    <!-- 1. lazy修饰符 -->
    <!-- 就是使用文本框进行输入的时候，只有按回车和失去焦点才更新 -->
    <input type="text" v-model.lazy="msg">
    <p>{{msg}}</p>
    
    <!-- 2. number修饰符 -->
    <input type="number" v-model.number="age">
    <p>{{age}}</p>

    <!-- 3. trim修饰符 -->
    <!-- 去除字符串首尾的空格 -->
    <input type="text" v-model.trim="account">
    {{account}}

  </div>
<br>
  <script>
    let app = new Vue({
      el:"#app",
      data:{ 
        msg:'hello world',
        age:12,
        account:''
      }
    })
  </script>
</body>
</html>